package org.patterns.behavior.state.switchstate;


//打开状态类
public class OnState extends SwitchState {
    public void on(Switch sw) {
        System.out.println("已经打开！");
    }

    public void off(Switch sw) {
        System.out.println("关闭！");
        sw.setState(Switch.getState("off"));
    }
}
